package com.pheruagor.handmanager.utils.combobox {
    import mx.controls.ComboBox;


    public class ComboboxUtils {

        public static function initializeCombo(comboBox:ComboBox, field:String, value:String):void {
            var index:int = 0;

            for each (var item:Object in comboBox.dataProvider) {
                if (String(item[field]) == value) {
                    comboBox.selectedIndex = index;
                    return;
                }
                index++
            }
            comboBox.selectedIndex = -1;
        }
    }
}